<div class="button-item border-spe-bottom">
    <button pButton type="text" *ngIf="selectedItem" class="ui-button-danger" icon="fa fa-times" (click)="delete($event)"
        label="删除"></button>
    <button pButton type="text" *ngIf="selectedItem" class="ui-button-warning" icon="fa fa-pencil-square-o" (click)="update($event)"
        label="修改"></button>
    <button pButton type="text" class="ui-button-info" icon="fa fa-plus" (click)="add($event)" label="新增"></button>
    <button pButton type="text" class="ui-button-success" icon="fa fa-search" (click)="display = true" label="查询"></button>
</div>

<div class="content-item">
    <div class="ui-g ui-g-12">
        <div *ngFor="let role of showItems" class="ui-g-4">
            <p-card title="{{role.roleName}}" [style]="role.checkStyle" (click)="roleSelect(role)">
                <div style="font-size: 16px;font-weight: 600">{{role.roleName}}</div>
            </p-card>
        </div>
    </div>
</div>

<!--查询条件窗口-->
<p-dialog header="配置查询" [(visible)]="display" modal="modal" width="400">
    <form [formGroup]="searchForm">
        <div class="ui-g">
            <div class="ui-g-12">
                <div class="ui-g-3">编码</div>
                <div class="ui-g-9">
                    <input pInputText ngModel type="text" formControlName="roleId" style="width:100%" />
                </div>
            </div>
            <div class="ui-g-12">
                <div class="ui-g-3">名称</div>
                <div class="ui-g-9">
                    <input pInputText ngModel type="text" formControlName="roleName" style="width:100%" />
                </div>
            </div>
        </div>
    </form>
    <p-footer>
        <button type="button" pButton icon="fa fa-close" (click)="display=false" label="取消"></button>
        <button type="button" pButton icon="fa fa-check" (click)="search($event)" label="确定"></button>
    </p-footer>
</p-dialog>
<p-confirmDialog #cd>
    <p-footer>
        <button type="button" pButton icon="fa fa-close" label="取消" (click)="cd.reject()"></button>
        <button type="button" pButton icon="fa fa-check" label="确定" (click)="cd.accept()"></button>
    </p-footer>
</p-confirmDialog>